<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>报告详情 | <?php echo ($site_name_cn); ?>安全应急响应中心</title>
        <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
        <meta name="description" content="<?php echo ($site_name_cn); ?>安全应急响应中心,<?php echo ($site_name_en); ?> Security Response Center">
        <meta name="keywords" content="<?php echo ($site_name_cn); ?>,<?php echo ($site_name_en); ?>,安全团队,应急响应,<?php echo ($site_name_cn); ?>安全应急响应中心,<?php echo ($site_name_en); ?> Security Response Center">
        <meta name="renderer" content="webkit">
        <meta name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=no">
        <link rel="icon" href="/Public/Index/images/logo.ico">
        <link rel="stylesheet" href="/Public/Index/css/main.css">
        <!--[if (gte IE 6)&(lte IE 8)]>
        兼容 CSS3 选择器
        <script type="text/javascript" src="/Public/Index/js/selectivizr.min.js"></script>
        兼容 media query
        <script type="text/javascript" src="/Public/Index/js/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="header">
            <div>
                <div class="logo">
                    <a href="">
                        <div class="logo_pic">
                        </div>
                        <div class="logo_name">
							<p><?php echo ($site_name_cn); ?>安全应急响应中心</p>
                            <p><?php echo ($site_name_en); ?> Security Response Center</p>
                        </div>
                    </a>
                </div>

                <div class="userpanel">
                    <div class="userpanel_line">
                        <div></div>
                    </div>
                    <div class="userpanel_user">
                        <img class="user_avatar mod-avatar-30" src="/Public/Uploads/<?php echo session('avatar');?>" alt="">
                        <span class="user_username"><?php echo session('username'); if(session('mnum') == 0): else: ?><i class="i-header-message"><?php echo session('mnum');?></i><?php endif; ?></span>
                        <i class="user_arrow"></i>
                        <div class="user_menu">
                            <ul class="menu_list">
                                <li class="list_item list_item-user">
                                    <a href="<?php echo U('index/index');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">个人主页</span>
                                    </a>
                                </li>
                                <li class="list_item list_item-message">
                                    <a href="<?php echo U('message/index');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">消息中心</span>
                                        <i class="item_icon-message"><?php echo session('mnum');?></i>
                                    </a>
                                </li>
                                <li class="list_item list_item-account">
                                    <a href="<?php echo U('info/index');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">账户设置</span>
                                    </a>
                                </li>
                                <li class="list_item list_item-logout">
                                    <a href="<?php echo U('login/logout');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">注销</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>

                <div class="nav">
                    <ul>
                        <li class="[index_banner]"><a href="/index.php">首页</a></li>
                        <li class="[banner_selected]"><a href="<?php echo U('post/add');?>">提交漏洞</a></li>
                        <li class="[annoucment_banner]"><a href="/index.php?m=&c=page&a=index">公告</a></li>
						<li class="[blog_banner]"><a href="/index.php?m=&c=blog&a=index">博客</a></li>
						<li class="[hall_banner]"><a href="/index.php?m=&c=hall&a=index">贡献榜</a></li>
                        <li class="[gift_banner]"><a href="<?php echo U('gift/index');?>">礼品兑换</a></li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="container container-user container-user-report-detail">
            <div>
                <!-- section-subnav 标题-->
                <div class="section section-subnav">
                    <div class="section_subnav">
                        <p class="subnav_title"><a href="user-center.html">个人中心</a></p>
                    </div>
                </div>

                <div class="section section-user">
                    <div class="section_user">
                        <div class="user_sidebar">
                            <div class="sidebar_header">
                                <!-- <p>个人中心</p> -->
                            </div>
                            <ul class="sidebar_nav">
                                <li class="nav_item"><a href="<?php echo U('index/index');?>">我的个人中心</a></li>
                                <li class="nav_item"><a href="<?php echo U('gift/record');?>">我的安全币</a></li>
                                <li class="nav_item nav_item-active"><a href="<?php echo U('post/index');?>">我报告的漏洞</a></li>
                                <li class="nav_item"><a href="<?php echo U('gift/order');?>">我的礼品</a></li>
                                <li class="nav_item"><a href="<?php echo U('message/index');?>">消息中心</a></li>
                                <li class="nav_item"><a href="<?php echo U('info/index');?>">我的个人信息</a></li>
                            </ul>
                        </div>

                        <div class="user_body">
                            <h2 class="body_title">SRC-<?php echo (date("Y",$model["time"])); ?>-<?php echo ($model["id"]); ?> | <?php echo ($model["title"]); ?></h2>

                            <div class="body_block body_block-progress">
                                <h3>处理进度</h3>
                                <div class="mod-progress">
                                    <ul class="progress_list">
                                        <?php if($model["type"] == 1): ?><li class="list_item list_item-active">审核中</li>
                                        <li class="list_item">已确认</li>
                                        <li class="list_item">已修复</li>
                                        <li class="list_item">完成</li>
										<?php elseif($model["type"] == 3): ?>
										<li class="list_item list_item-passed">审核中</li>
                                        <li class="list_item list_item-active">已确认</li>
                                        <li class="list_item">已修复</li>
                                        <li class="list_item">完成</li>
										<?php elseif($model["type"] == 4): ?>
										<li class="list_item list_item-passed">审核中</li>
                                        <li class="list_item list_item-passed">已确认</li>
                                        <li class="list_item list_item-active">已修复</li>
                                        <li class="list_item">完成</li>
										<?php elseif($model["type"] == 2): ?>
										<li class="list_item list_item-passed">审核中</li>
                                        <li class="list_item list_item-passed">已确认</li>
                                        <li class="list_item list_item-passed">已修复</li>
                                        <li class="list_item list_item-active">已忽略</li>
										<?php elseif($model["type"] == 5): ?>
										<li class="list_item list_item-passed">审核中</li>
                                        <li class="list_item list_item-passed">已确认</li>
                                        <li class="list_item list_item-passed">已修复</li>
                                        <li class="list_item list_item-active">完成</li><?php endif; ?>
                                    </ul>
                                </div>
                            </div>
							
							<?php if($model["type"] == 4): ?><div style="margin-top:30px;padding:20px;border-top:1px solid #d9d9d9;border-bottom:1px solid #d9d9d9;">
                                <div>
                                    请确认漏洞是否已修复？
                                    <a class="mod-btn mod-btn-blue" href="<?php echo U('post/confirm?rid='); echo ($model["id"]); ?>">确认修复</a>
                                </div>
                            </div><?php endif; ?>

                            <div class="body_block body_block-info">
                                <h3>基本信息</h3>
                                <div class="block_content">
                                    <div class="content_leftblock">
                                        <p class="content_time">提交时间：<span><?php echo (date("Y-m-d H:i:s",$model["time"])); ?></span></p>
                                        <p class="content_type">漏洞类型：<span><?php echo ($model["category_title"]); ?></span></p>
                                    </div>
                                    <div class="content_rightblock">
                                        <p class="content_rank">危害等级评定：<?php if($model["rank"] == 1): ?><span class="colortips-gray">无影响</span>
                                        <?php elseif($model["rank"] == 2): ?><span class="colortips-black">低危</span>
                                        <?php elseif($model["rank"] == 3): ?><span class="colortips-orange">中危</span>
                                        <?php elseif($model["rank"] == 4): ?><span class="colortips-red">高危</span><?php endif; ?></p>
                                        <p class="content_coins">安全币评定：<span><?php echo ($model["bounty"]); ?></span></p>
                                    </div>
                                </div>
                            </div>

                            <div class="body_block body_block-detail">
                                <h3>漏洞详情</h3>
                                <div>
                                   <?php echo (waf(htmlspecialchars_decode($model["content"]))); ?>
                                </div>
								<div>
									<br/>
									<?php if($model["attachment"] != ''): ?><p>附件：<span><a href="/Public/Uploads/<?php echo ($model["attachment"]); ?>" style="color:#007cfa;" target="_blank">点击下载</a></span></p><?php endif; ?>
								</div>
                            </div>

                            <div class="body_block body_block-log">
                                <h3>状态变更详情</h3>
                                <div class="mod-sheet">
                                    <div class="sheet_body">
                                        <table class="body_table">
                                            <thead>
                                                <tr>
                                                    <th class="th-1">处理时间</th>
                                                    <th class="th-2">处理详情</th>
                                                </tr>
                                            </thead>
                                            <tbody>
												<?php if(is_array($pstat)): foreach($pstat as $key=>$pstat_val): ?><tr>
                                                    <td><?php echo (date("Y年m月d日",strtotime($pstat_val["time"]))); ?></td>
                                                    <td><?php echo ($pstat_val["content"]); ?></td>
                                                </tr><?php endforeach; endif; ?>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div class="block-log_qq">
                                    <span>遇到问题？对反馈有异议？请联系</span>
                                    <a class="mod-btn mod-btn-qq" href="http://wpa.qq.com/msgrd?v=3&uin=<?php echo ($site_qq); ?>&site=qq&menu=yes" target="_blank"><i class="i-qq"></i>工作人员</a>
                                </div>
                            </div>

                            <div class="mod-form-comment body_block body_block-comment">
                                <h3>漏洞留言</h3>
                                <div class="comment_list">
                                    <ul>
									<?php if(is_array($comment)): foreach($comment as $key=>$v): if($v["admin_name"] == '匿名用户'): ?><li class="list_item">
												<div class="item_avatar">
													<img class="mod-avatar mod-avatar-50" src="/Public/Uploads/comment_user_avatar.png" alt=""></a>
												</div>
												<div class="item_user">
													<a class="user_name"><?php echo ($v["user_name"]); ?></a>
													<p class="user_comment"><?php echo ($v["content"]); ?></p>
												</div>
												<span class="item_time">
													<?php echo (date("Y年m月d日",$v["update_time"])); ?>
												</span>
											</li>
                                        <?php else: ?>
											<li class="list_item">
												<div class="item_avatar">
													<img class="mod-avatar mod-avatar-50" src="/Public/Uploads/comment_admin_avatar.png" alt=""></a>
												</div>
												<div class="item_user">
													<a class="user_name"><?php echo ($v["admin_name"]); ?> (管理员)</a>
													<p class="user_comment"><?php echo ($v["content"]); ?></p>
												</div>
												<span class="item_time">
													<?php echo (date("Y年m月d日",$v["update_time"])); ?>
												</span>
											</li><?php endif; endforeach; endif; ?>
                                </div>
                                <div class="comment_textarea">
                                    <textarea name="" id="comment_content" cols="30" rows="10" placeholder="您可以在此对管理员留言"></textarea>
									<input hidden id="post_id" type="text" value="<?php echo ($model["id"]); ?>">
                                </div>
                                <div class="comment_verify">
                                    <input id="verify_code" type="text" name="verify" placeholder="验证码" >
                                    <img onclick="refresh_captcha();" id="verify" src="<?php echo U('login/verify');?>" alt="点击刷新"/>
                                    <a onclick="refresh_captcha();">换一张</a>
                                    <span class="formtips-error">您输入的验证码有误，请重新输入</span>
                                </div>
                                <div class="comment_submit">
                                    <a class="mod-btn mod-btn-blue" onclick="submit_comment();">提交留言</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
		<!--弹出层-->
		<div id="comment_success" class="mod-popup mod-popup-report">
					<div class="popup_mask">
					</div>
					<div class="popup_body">
						<div class="body_content">
							<p class="content_title">留言成功!</p>
							<p class="content_text">感谢您提交留言，管理员将尽快回复。</p>
						</div>
						<div class="body_btns">
							<a class="mod-btn mod-btn-blue mod-btn-close" onclick="window.location.reload()">返回报告</a>
						</div>
						<i class="i-close"></i>
					</div>
		</div>
		<div id="comment_fail" class="mod-popup mod-popup-report">
					<div class="popup_mask">
					</div>
					<div class="popup_body">
						<div class="body_content">
							<p class="content_title">留言失败!</p>
							<p id="fail_detail" class="content_text">操作错误，请尝试重新提交。</p>
						</div>
						<div class="body_btns">
							<a class="mod-btn mod-btn-blue mod-btn-close" onclick="window.location.reload()">返回报告</a>
						</div>
						<i class="i-close"></i>
					</div>
		</div>
<script>
    function refresh_captcha(){
            var src = "<?php echo U('login/verify');?>";
            var random = Math.floor(Math.random()*(1000+1));
            $("#verify").attr("src",src+"&random="+random);
    }
</script>
<script>
function submit_comment(){
				var  verify_code_val = $("#verify_code").val();
				var  post_id_val = $("#post_id").val();
				var  comment_content_val = $("#comment_content").val();
                $.ajax({
                    url: "/user.php?m=user&c=post&a=comment",
                    type: "POST",
                    data: {post_id:post_id_val,content:comment_content_val,verify:verify_code_val},
                    success: function (data) {
                        if (data.status == "1") {
							$("#comment_success").css("display","block");
                        }else{
							$("#comment_fail").css("display","block");
							$("#fail_detail").text(data.info);
                        }
                    },
                    error: function () {
						$("#comment_fail").css("display","block");
						$("#fail_detail").text(data.info);
                    }
                });
}
</script>
<!-- footer -->
        <div class="footer">
            <div>
                <div class="footer_about">
                    <p class="about_link">
                        <a href="<?php echo ($site_about); ?>" target="_blank">关于腾讯</a>
                        |
                        <a href="<?php echo ($site_career); ?>">加入我们</a>
                        |
                        <a href="/user.php?m=user&c=post&a=add">报告漏洞</a>
                    </p>
                    <p class="about_copyright">
                        <span>Copyright &copy; <?php echo date('Y'); ?> <?php echo ($site_copyright); ?>. All Rights Reserved</span>
						<span>Powered by <a href="https://security.tencent.com/index.php/xsrc">Tencent xSRC</a></span>
                    </p>
                </div>

                <div class="footer_contact">
                    <a class="contact_icon-email" href="mailto:<?php echo ($site_email); ?>"><i></i><span>专用邮箱</span>|</a>
                    <a class="contact_icon-weixin mod-qrcode" href="">
                        <i></i><span>微信公众号</span>
                        <div class="qrcode">
                            <div class="qrcode_pic">
                                <img src="<?php echo ($site_wechat); ?>" alt="">
                            </div>
                            <span class="qrcode_text">扫一扫关注公众号</span>
                        </div>
                    </a>
                </div>
            </div>
        </div>

        <script src="/Public/Index/js/jquery-1.7.2.min.js"></script>
        <script src="/Public/Index/js/test.js"></script>
		<script src="https://security.tencent.com/static/plugins/jquery.ajaxfileupload.js"></script>
    </body>
</html>